(1) Field of the Invention
This invention relates to a debugging apparatus, and more specifically, to a debugging apparatus for debugging a debug target program by changing hardware environments without changing program operation state.
(2) Description of the Prior Art
Microcomputer systems are indispensable to electrical appliances today. In developing programs for such microcomputer system, debugging is very important since microcomputer systems require such a quality as enduring mass production.
For debugging programs, the debug target programs are run in hardware environments to find errors (bugs). The bugs found are deleted from the programs.
The hardware environments in which debug target programs run are classified as follows:
(1) target machine prototypes; PA1 (2) evaluation boards; and PA1 (3) simulators on host computers.
The hardware environment of (1) above is called "monitor type." In the monitor type hardware environment, operations of prototype microprocessors are monitored and simple debugging is performed.
The hardware environment of (2) above enables a high-quality debugging, using an in-circuit emulators (ICE) and various debugging tools. This hardware environment is called "ICE type."
The hardware environment of (3) above is called "simulator type." The simulators used in the environment are divided into two types: instruction level software simulators and logic level software simulators. Instruction level software simulators are such software systems as realizing, in a host computer, pseudo operation states of microprocessors by executing instructions of the microprocessors in the host computer.
The logic level software simulators simulate hardware operations and are generally used for designing microprocessor chips.
Meanwhile, these three types of hardware environments have their limitations respectively in the ability of testing operations.
In the ICE type hardware environment, the trace function can be used to output history of program operations. In the monitor type hardware environment, in contrast, it is difficult to use the trace function since it requires a great amount of memory capacity. Therefore, the operator is obliged to analyze the cause of bugs with other less-quality functions in the monitor type. It may be said that the program verification in the monitor type is insufficient since various cases such as multiple interrupts, interrupts at an appointed time, etc cannot be applied to the debug target program. On the other hand, modifying the hardware monitor machine is not realistic.
The limitations of the ICE type hardware environment derive from the difference in the circuit structure between the evaluation board and the target microprocessor. Even if the microprocessor appears to operate perfectly on the evaluation board, it is not enough to permit the shipping of the microprocessor. The microprocessor should be verified with its peripherals. Lines in the evaluation board, for example, may longer than those of a prototype microprocessor. This may generate a time lag when using the peripherals, which results in incorrectness of the microprocessor verification.
The limitation of the simulator type hardware environment derives from the slowness of operations. This is because the simulator itself uses the host computer. A process which takes one second in the ICE type or monitor type hardware environment, for example, takes several minutes or tens of several minutes in the simulator type hardware environment.
When an error occurs in a certain situation in a hardware environment, the operator may desire to reproduce the same situation in another hardware environment. Reproducing of such situations, however, generally requires a lot of trials and errors before the reproduction succeeds, such as transferring values at the time when an error occurred to the other environment, or running the debug target program from the beginning, etc. Such trials and errors takes a lot of time in the development of the microprocessor.